import {EntityId, PageQueryParams} from "kf-web-library";
import {Journal_Summary, JournalColumn} from "@/services";

export interface JournalPeriodPageQueryParams extends Partial<PageQueryParams> {
  searchText?: string;
  ids?: EntityId[];
  journalId?: string; //所属期刊
  year?: number;  //年
  volume?: string;  //卷
  period?: string;  //期
  periodPdfExist?: boolean;  //periodPdfExist
  validPdfNum?: boolean;
}

export interface JournalPeriod {
  id: EntityId; //主键
  year: number; //年
  volume: string; //卷
  period: string; //期
  journal: Journal_Summary; //期刊
  journalLogoName: string; //LOGO名称
  journalLogoPath: string; //LOGO路径
  journalLogoSize: string; //LOGO大小
  journalCoverName: string; //封面名称
  journalCoverPath: string; //封面路径
  journalCoverSize: string; //封面大小
  periodName: string; //分期名称
  periodStartDate: string; //分期开始日期
  periodEndDate: string; //分期结束日期
  journalColumnList: JournalColumn[]; //分期栏目
  createTime: string; //创建时间
  createUserId: number; //${column.comment}
  modifyTime: string; //修改时间
  modifyUserId: number; //${column.comment}
  periodPdfUrl: string; //PDF地址
  periodPdfExist: boolean; //PDF地址是否存在
  articlePdfNum: number; //文章数量
  articleValidPdfNum: number; //有效文章数量
  publicationDate: string; //出刊日期
  periodZipLocalFlag: boolean;
  periodZipUrl: string;
  periodZipExist: string;
  hitsnum: number; //点击数量
  sharenum: number; //转发数量
  likesnum: number; //点赞数量
  collectionnum: number; //收藏数量
  haslikes: boolean; //是否被当前用户点赞
  hascollection: boolean; //是否被当前用户收藏

  articleTotal: number;
}

export interface JournalPeriod_Summary{
  id: number; //主键
  periodName: string; //分期名称
}


export interface JournalPeriod_Create{
  journalId: string; //期刊ID
  journalNameCn?: string;
  year: number; //年
  volume: string; //卷
  period: string; //期
  journalLogoName: string; //LOGO名称
  journalLogoPath: string; //LOGO路径
  journalLogoSize: string; //LOGO大小
  journalCoverName: string; //封面名称
  journalCoverPath: string; //封面路径
  journalCoverSize: string; //封面大小
  periodStartDate: string; //分期开始日期
  periodEndDate: string; //分期结束日期
  journalColumnIdList: number[]; //分期栏目ID集合
}




export interface JournalPeriod_Modify extends JournalPeriod_Create {
  id: EntityId;
}

export interface JournalPeriod_Patch extends Partial<JournalPeriod_Modify> {
  id: EntityId;
}






